from presentation.Apriori import Apriori, Rule_generate
from presentation.load_data import load_data

dataset=load_data("D:\数据仓库挖掘presentation\事务数据库.txt")

# 设置minsupport = 50%
minsupport = 0.5
Lmax = Apriori(dataset, minsupport)
print(Lmax)

# 设置最小置信度
minconf = 0.8
rules = Rule_generate(dataset, Lmax, minconf)
print(rules)